package com.potenza.training.resume.controller;

import com.potenza.training.resume.entity.ImageExamineEntity;
import com.potenza.training.resume.service.ImageExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("resume/image/examine")
public class ImageExamineController {

    @Autowired
    ImageExamineService imageExamineService;

    @PostMapping("examinImage")
    public void  examinImage (@RequestBody ImageExamineEntity imageExamineEntity){
        imageExamineService.examinImage(imageExamineEntity);
    }

    @GetMapping("findExaminImage/{resumeId}")
    public List<ImageExamineEntity> findExaminImage(@PathVariable Integer resumeId){
        return imageExamineService.findExaminImage(resumeId);
    }

    @GetMapping("findExaminImageById/{id}")
    public ImageExamineEntity findExaminImageById(@PathVariable Integer id){
        return imageExamineService.findExaminImageById(id);
    }
}
